home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / mac / Chapter Tutorials / ch06.Media / ShapesPatterns / Wlpaper / wall.dcr / 00019.ls < prev    next >
Encoding:
Text File  |  1996-11-26  |  508 b   |  18 lines

  1. global cColorLeft, cColorList, cBGSprite
  2.  
  3. on mouseDown
  4.   set whichSprite to the clickOn
  5.   puppetSprite(whichSprite, 1)
  6.   repeat while the stillDown
  7.     set the locH of sprite whichSprite to the mouseH
  8.     set the locV of sprite whichSprite to the mouseV
  9.     set colorIndex to the locH of sprite whichSprite - cColorLeft
  10.     if colorIndex = 0 then
  11.       set colorIndex to 1
  12.     end if
  13.     updateStage()
  14.   end repeat
  15.   set the foreColor of sprite cBGSprite to getAt(cColorList, colorIndex)
  16.   updateStage()
  17. end
  18.